  def groupByKeyword(groups) {
      def stream;
      def map = [:]

      try {
          stream = url.openStream();
          def slurper = new XmlSlurper();
          def rss = slurper.parse(stream);

          groups.each {
              def group = it.toUpperCase();
              map[group] = [];

              rss.channel.item.each {
                  if (it.title.text().toUpperCase() =~ group) {
                      map[group] += it.title;
                  }
              };
          }
      } catch (e) {
          println e;
      } finally {
          if (stream)
              stream.close();
      }

      return map;
  }

 static void main(args) {

        def url = args[0];

        def keywords = args[1..<args.length];
    
        def reader = new RssReader(url);

        def groups = reader.groupByKeyword(keywords);

        groups.entrySet().each {
            println "$it.key"

            it.value.each {
                println "\t* $it"
            }
        }
    }

